package com.guoxue.service.impl;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.guoxue.dao.IUserDao;
import com.guoxue.domain.UserVo;
import com.guoxue.service.IUserService;
@Service("userService")
public class UserServiceImpl  implements IUserService{

	@Autowired  
    private IUserDao userDao;
  
      
    public void saveUser(UserVo user) {  
    	userDao.saveUser(user);  
    }  
    
	public UserVo getUser(String account) {
		return userDao.getUser(account);
	}


	public UserVo getUserById(String identityId) {
		return userDao.getUserById(identityId);
	}

	public UserVo getUserByTel(String account) {
		return userDao.getUserByTel(account);
	}

	public List<UserVo> getUserList() {
		return userDao.getUserList();
	}

	public UserVo getUserByNickname(String nickName) {
		return userDao.getUserByNickname(nickName);
	}

	public int updateUserNickName(String nickName, String account) {
		return userDao.updateUserNickName(nickName, account);
	}

	public void updateAccountStatus(int id,int status) {
		userDao.updateAccountStatus(id,status);
	}

	@Override
	public UserVo getUserByKey(int id) {
		return userDao.getUserByKey(id);
	}

}
